<template>
  <div>
    <my-header :myTitle="msg" :btnFun="pFun"></my-header>

    <hr>
    <my-content></my-content>
  </div>
</template>

<script>
export default {
  name: 'App',
  data(){//数据
    return {msg:'我是父组件中定义的数据'};
  },
  methods:{//函数
    pFun(m){
      this.msg = m;//给父组件的msg赋值
    }
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
